# Maintainer: Andy Postnikov <apostnikov@gmail.com>
pkgname=php84-pecl-excimer
_extname=excimer
pkgver=1.2.2
pkgrel=1
pkgdesc="Interrupting timer and low-overhead sampling profiler PHP 8.4 - PECL"
url="https://pecl.php.net/package/excimer"
arch="all"
license="Apache-2.0"
_phpv=84
_php=php$_phpv
depends="$_php-common"
makedepends="$_php-dev"
source="php-pecl-$_extname-$pkgver.tar.gz::https://pecl.php.net/get/$_extname-$pkgver.tgz"
builddir="$srcdir"/$_extname-$pkgver

build() {
	phpize$_phpv
	./configure --prefix=/usr --with-php-config=/usr/bin/php-config$_phpv
	make
}

check() {
	rm -f tests/maxDepth.phpt
	make NO_INTERACTION=1 REPORT_EXIT_STATUS=1 test TESTS=--show-diff
	$_php -d extension=modules/$_extname.so --ri $_extname
}

package() {
	make INSTALL_ROOT="$pkgdir" install
	local _confdir="$pkgdir"/etc/$_php/conf.d
	install -d $_confdir
	echo "extension=$_extname" > $_confdir/$_extname.ini
}

sha512sums="
b63e202e1fbc524a0d86c782d7174eb0abf99b62011c8856ee3f4358a64054f9753265800a61cd80678d2477c8e7a4baaf6677398c2f17a8444ba54644e9b171  php-pecl-excimer-1.2.2.tar.gz
"
